<?php

namespace App\Models;

use App\Models\Traits\Common;
use Illuminate\Database\Eloquent\Model;

class EduLesson extends Model
{
    use Common;
    protected $fillable=[
        'title','description','is_top','preview','user_id'
    ];
    //课程表和视频表是一对多的关系
    function videos(){
        //课程表和视频表是一对多的关系,EduVideo表的外键四lession_id
       return $this->hasMany(EduVideo::class,'lesson_id');
    }
}
